package com.ai.service.security;

import com.ai.common.CommonResponse;
import com.ai.entity.security.SysPermission;
import com.ai.model.param.SysPermissionParam;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 权限表 服务类
 * </p>
 *
 * @author chen
 * @since 2023-04-04 19:46:06
 */
public interface ISysPermissionService extends IService<SysPermission> {


    /**
     * 查询用户的权限列表
     *
     * @param userId
     * @return
     */
    List<SysPermission> selectListByUser(Integer userId);

    /**
     * 查询具体某个接口的权限
     *
     * @param path
     * @return
     */
    List<SysPermission> selectListByPath(String path);

    CommonResponse<String> add(SysPermissionParam permissionParam);

    CommonResponse<String> updatePermission(SysPermissionParam permissionParam);

    CommonResponse<SysPermission> permissionList(String roleId);


    CommonResponse permissionList();


    SysPermission getPermissionByCode(String oldRegionCode);

}
